/**
 * Created with IntelliJ IDEA.
 * ClassName: TestBreak
 * Package: PACKAGE_NAME
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-06-19
 * Time: 13:05
 */

public class TestBreak {
    public static void main(String[] args) {
        for (int i = 0; i < 5 ;i++){
            if (i == 3){
                break;
            }
            System.out.println(i);
        }
        System.out.println("循环外的代码");


        try{
            for (int i = 0 ;i <5; i++){
                if (i== 3){
                    throw new RuntimeException();
                }
                System.out.println(i);
            }
        }catch (Exception e){
            //什么都不做 等同break
        }
        System.out.println("等同break");
    }
}
